﻿using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using TimServerSDK.Core.Enums;

namespace TimServerSDK.Core
{
    public class TimServerResult
    {
        public bool IsOK()
        {
            return ActionStatus == "OK";
        }

        /// <summary>
        /// 请求处理的结果，OK 表示处理成功，FAIL 表示失败
        /// </summary>
        public string ActionStatus { get; set; }

        /// <summary>
        /// 错误码，0表示成功，非0表示失败
        /// </summary>
        public int ErrorCode { get; set; }

        /// <summary>
        /// 错误信息
        /// </summary>
        public string ErrorInfo { get; set; }

        /// <summary>
        /// 详细的客户端展示信息
        /// </summary>
        public string ErrorDisplay { get; set; }
    }
}
